/*
 *@Student 张策
 */
public class Tank  {
    private int x;
    private int y;
    private int rect;
    private int speed = 3;

    public int getRect() {
        return rect;
    }

    public void setRect(int rect) {
        this.rect = rect;
    }

    public Tank(int x, int y) {
        this.x = x;
        this.y = y;
    }

    //上下左右移动
    public void moveUp() {
        y -= speed;
    }
    public void moveRight() {
        x += speed;
    }
    public void moveDown() {
        y += speed;
    }
    public void moveLeft() {
        x -= speed;
    }
    public int getX() {
        return x;
    }
    public void setSpeed(int speed) {
        this.speed = speed;
    }
    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }
}

